<?php

namespace App\Livewire;

use Livewire\Attributes\Title;
use Livewire\Component;


class Index extends Component
{
    public $category_id;

    public $keyword;

    public function mount($category_id = null, $keyword = '')
    {
        $this->category_id = $category_id;
        $this->keyword = $keyword;
    }

    #[Title('首页')]
    public function render()
    {
        return view('livewire.index', [
            'category_id' => $this->category_id,
            'keyword'     => $this->keyword
        ]);
    }
}
